﻿<Window x:Class="VisaCRM.Modules.Admin.Views.IndustryView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:vm="clr-namespace:VisaCRM.Modules.Admin.ViewModels"
             xmlns:v="clr-namespace:VisaCRM.Modules.Admin.Views"
             mc:Ignorable="d" WindowStartupLocation="CenterScreen" Width="461.571" Height="254.286" ResizeMode="NoResize">
    <Window.Resources>
        <DataTemplate DataType="vm:IndustryViewModel">
        </DataTemplate>
    </Window.Resources>
    <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0,0,0,0">
        <Grid.RowDefinitions>
            <RowDefinition Height="35" />
            <RowDefinition Height="35" />
            <RowDefinition Height="35" />
            <RowDefinition Height="35" />
            <RowDefinition Height="35" />
            <RowDefinition Height="35" />
            <RowDefinition Height="35" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <DataGrid Name="grdIndustry" Grid.Column="0" Grid.RowSpan="6" HorizontalAlignment="Center" VerticalAlignment="Top" SelectedItem="{Binding Path=.CurrentIndustry, Mode=TwoWay}" ItemsSource="{Binding Path=AllIndustries}" AutoGenerateColumns="False" Margin="0,0,2,0" >
            <DataGrid.Columns>
                <DataGridTextColumn Header="Industry" Width="Auto" Binding="{Binding Path=IndustryName}" />
            </DataGrid.Columns>
        </DataGrid>
        <Label HorizontalAlignment="Left" Grid.Row="0" Content="Industry" Background="Aquamarine" Margin="48,10,0,0" VerticalAlignment="Top" Height="27" RenderTransformOrigin="0.5,0.5" Width="61" Grid.Column="1"/>

        <TextBox HorizontalAlignment="Left" Height="23" Margin="10,10,0,0" VerticalAlignment="Top" Width="120" Text="{Binding CurrentIndustryName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged }" Grid.Column="2"/>

        <Button HorizontalAlignment="Left" Content="Add New" Margin="13,10,0,0" VerticalAlignment="Center" Width="121" Height="23" Command="{Binding Path=AddNewCommand}" RenderTransformOrigin="0.456,0.247" Grid.Column="1" Grid.Row="1"/>
        <Button HorizontalAlignment="Left" Content="Edit" Margin="13,10,0,0" VerticalAlignment="Center" Width="121" Height="23" Command="{Binding Path=EditCommand}" Grid.Column="1" Grid.Row="2"/>
        <Button HorizontalAlignment="Left" Content="Save" Margin="13,10,0,0" VerticalAlignment="Center" Width="121" Height="23" Command="{Binding Path=SaveCommand}" Grid.Column="1" Grid.Row="5"/>
        <Button HorizontalAlignment="Left" Content="Cancel" Margin="13,3,0,0" VerticalAlignment="Center" Width="121" Height="23" Command="{Binding Path=CancelCommand}" Grid.Column="1" Grid.Row="4"/>
        <Button HorizontalAlignment="Left" Content="Delete" Margin="13,10,0,0" VerticalAlignment="Center" Width="121" Height="23" Command="{Binding Path=DeleteCommand}" Grid.Column="1" Grid.Row="3"/>
    </Grid>
</Window>
